//可以将ERC20GuDingToken替换成自己想要布署的合约名称
const ERC20GuDingToken = artifacts.require("ERC20GuDingToken");
const ERC20SuoCangToken = artifacts.require("ERC20SuoCangToken");

module.exports = (deployer, network, accounts) => {
    //发行总量
    const totalSupply = 1000000000;  
    //锁仓总量
    const amount = 1000;  
    deployer.deploy(ERC20GuDingToken,
        //构造函数的参数
        "SuoCangStartToken",   //代币名称
        "SCST",              //代币缩写
        18,                 //精度
        totalSupply         //发行总量
    )
        .then((ERC20GuDingTokenInstance) => {
            return deployer.deploy(ERC20SuoCangToken,
                ERC20GuDingTokenInstance.address,           //ERC20代币合约地址
                accounts[0],                                //受益人为当前账户
                parseInt(new Date().getTime() / 1000 + 10)  //解锁时间戳
            ).then((ERC20SuoCangTokenInstance) => {
                //将代币转移到锁仓合约的账户中
                ERC20GuDingTokenInstance.transfer(ERC20SuoCangTokenInstance.address, web3.utils.toWei(amount.toString(),'ether'));
            })
        });
};